;; PRODUCT: <ADDRESS BOOK>
;; PRODUCT-ID: 428a0cb0-d537-4cce-93e4-5ff1c683f831
;; AUTHOR: NILESH GANDHI


;;Objective:-
;;Display Address for Sundry Debtors and Creditors
;;================================================

;;Add a new menu-option in Gateway of Tally
[#Menu: GatewayOfTally]
	Add: Item: Before: ~Balance Sheet: Address Book: Menu: MyMenu

;;Menu options for "Address book"
[Menu: MyMenu]
	Title: Address Book
	Add: Item: Sundry Debtors Details: Display : SD Address Book
	Add: Item: Sundry Creditors Details: Display: SC Address book

;;Sundry Debtors Address Book Report
[Report: SD Address Book]
	;;DSP Template is a report defined in default TDL
    Use: DSP Template

	Form: SD Address Book
	Title: Sundry Debtors Address Book

;;Sundry Creditors Address Book Report
[Report: SC Address Book]
    ;; Inherit from Sundry Debtors Report that we defined earlier
	Use: SD Address Book 	

    ;;Should show Ledger falling under Sundry Creditors
    ;;The 'Local' keyword here re-uses the Global Collection "My Sundry Debtors" and
    ;;modifies it to include "Sundry Creditors" list
    Local: Collection: My Sundry Debtors: Child Of: $$GroupSundryCreditors
	Title: Sundry Creditors Address Book

[Form: SD Address Book]
	Use: DSP Template
	Part: SD Address Book Title, SD Address Book

[Part: SD Address Book Title]
	Line: SD Address Book Title

[Line: SD Address Book title]
	Use: SD Address Book
	Local: Field: SD Sr no 		: Set as: "Sr"
	Local: Field: SD Name		: Set as: "Name"
	Local: Field: SD Address		: Set as: "Address"
	Local: Field: SD PANNumber		: Set as: "PAN"
	Local: Field: SD TINNumber		: Set as: "TIN"
	Local: Field: SD STNumber		: Set as: "STN"

[Part: SD Address Book]
	Line: SD Address Book
	Repeat: SD Address Book: My Sundry Debtors
	Scroll: Vertical
	Common Border: Yes

[Line: SD Address Book]
	Field: SD Sr No,SD Name
	Right Field: SD Address, SD PANNumber, SD TINNumber, SD STNumber

[Field: SD Sr No]
	Use: Short Name Field
	Set as: $$Line
	Style: Normal
	Width: 4
	Align: Centre

[Field: SD Name]
	Use: NAme Field

    ;;Retrieve the value of Internal Object 'Name' of Ledger Object
	Set as: $Name
	Full Width: Yes
	Border: Thin Left

[Field: SD Address]
	Use: Short Name Field

    ;;Retrieve the value of Internal Object 'Address' of Ledger Object
	Set As: $$FullList:Address:$Address
	Style: Normal
	Border: Thin Left

	;;Expands to fit multiple lines
    Lines: 0

[Field: SD PANNumber]
	Use: Short Name Field
	
    ;;Retrieve the value of Internal Object 'IncomeTaxNumber' of Ledger Object
    Set As: $IncomeTaxNumber
	Style: Normal
	Border: Thin Left

[Field: SD TINNumber]
	Use: Short Name Field
	
    ;;Retrieve the value of Internal Object 'SalesTaxNumber' of Ledger Object
    Set As: $VATTINNumber
	Style: Normal
	Border: Thin Left

[Field: SD STNumber]
	Use: Short Name Field
	
    ;;Retrieve the value of Internal Object 'ServiceTaxNumber' of Ledger Object
    Set As: $ServiceTaxNumber
	Style: Normal
	Border: Thin Left

;;Define Collection for retreiving sundry debtors list
[Collection: My Sundry Debtors]
	Type: Ledger
	Child of: $$GroupSundryDebtors
	Belongs To: Yes

	

